#include <iostream>

using std::cout;
using std::endl;
using std::cin;

void test()
{
    int a = 0;
    int b = 0;
    cin >> a >> b;
    try
    {
        if(0 == b)
        {
            throw b;//抛出异常
        }
        else
        {
            cout << "a/b = " << a/b << endl;
        }
    }
    catch(double dx)
    {
        //具体的写法可以自定义
        cout << "catch(double)" << endl;
    }
    catch(int ix)
    {
        //具体的写法可以自定义
        cout << "catch(int)" << endl;
    }
    catch(long lx)
    {
        //具体的写法可以自定义
        cout << "catch(long)" << endl;
    }
    catch(...)
    {
        cout << "...." << endl;
    }
}

int main(int argc, char *argv[])
{
    test();
    return 0;
}

